﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Super64.Emulation;

namespace Super64
{
    public partial class Form1 : Form
    {
        M6510 cpu;
        public Form1()
        {
            InitializeComponent();
            cpu = new M6510();
        }

        private void kernalROMLocationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.FileOk += cpu.mem.LoadKernal;
            ofd.ShowDialog();
        }

        private void powerOnC64ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            for (; ; )
            {
                cpu.tick();
            }
        }

        private void basicROMLocationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.FileOk += cpu.mem.LoadBasic;
            ofd.ShowDialog();
        }
    }
}
